1. Field of the Invention
The present invention relates to a motor driving device.
2. Description of the Related Art
A stepping motor is used for controlling various electronic devices in positioning of a carriage in a printer or the like. FIG. 6 is a diagram illustrating an example of a common motor driving device for driving a two-phase stepping motor. A motor M includes coils L1 and L2 creating an A-phase magnetic field and coils L3 and L4 creating a B-phase magnetic field, and a motor driving device 100 is provided in order to control driving of the motor M. The motor driving device 100 is configured with switching elements F1 to F4 for controlling an electric current passed through the coils L1 to L4, an output control unit 102 for controlling on/off of the switching elements F1 to F4, resistors R1 and R2 for detecting an electric current passed through the coils L1 to L4, and a current detecting unit 104 for detecting whether or not a current passed through the coils L1 to L4 has reached a predetermined current.
For example, the output control unit 102 passes a current through the motor coil L1 by turning on the switching element F1. A current passed through the coil L1 is increased as time elapses, and a current detecting voltage occurring at one end of the resistor R1 is also increased. Then, when the current detecting unit 104 detects that the current detecting voltage has become higher than a predetermined reference voltage VREF, the output control unit 102 determines that a current passed through the coil L1 has reached the predetermined current and turns off the switching element F1. Thereafter as well, the output control unit 102 repeats on/off of the switching element F1. Also, the other switching elements F2 to F4 are similarly controlled. That is, in the motor driving device 100, an amount of a current passed through the coils L1 to L4 is adjusted by PWM (Pulse Width Modulation) control.
In the motor M, a single pair of transformer structures is formed by the A-phase coils L1 and L2, and a single pair of the transformer structures is formed by the B-phase coils L3 and L4. Therefore, when the switching element F1 is on/off, for example, as shown in FIG. 7A, a current is passed through the coil L1 and energy is accumulated in a period when the switching element F1 is on, while as shown in FIG. 7B, the energy accumulated in the coil L1 is transferred to the coil L2 when the switching element F1 is turned off, and a regeneration current is passed through a path from a parasitic diode of the switching element F2 to the coil L2, so that the energy is consumed. That is, as shown in FIG. 8, a current ID passed through the switching element F1 is increased during the period when the switching element F1 is on, and when the switching element F1 is turned off, the current ID is immediately decreased, and a drain-source voltage VDS of the switching element F1 is increased. Also, when the switching element F2 is on/off, the energy accumulated in the coil L2 during the period when the switching element F2 is on is transferred to the coil L1 when the switching element F2 is turned off and a current is passed through a path from the parasitic diode of the switching element F1 to the coil L1, so that the energy is consumed. The same applies to the B-phase coils L3 and L4.
As mentioned above, with on/off of the switching elements F1 to F4, energy is transferred between the coils L1 and L2 and between the coils L3 and L4. Thus, if the coil L2 is disconnected from the motor driving device 100 due to a poor connection or the like, for example, when the switching element F1 is turned off after being on, the energy accumulated in the coil L1 is not transferred to the coil L2. In this case, as shown in FIG. 9, when the switching element F1 is turned off, the drain-source voltage VDS of the switching element F1 is increased to an extremely high level and an avalanche state is brought about in the switching element F1. Then, the energy accumulated in the coil L1 is absorbed in the switching element F1 as avalanche energy and is slowly consumed by an avalanche current passed through the switching element F1. If such an avalanche state occurs, the drain-source voltage VDS of the switching element F1 becomes extremely increased, and thus, if on/off of the switching element F1 is repeated in a state where the coil L2 is disconnected from the motor driving device 100, a junction part of the switching element F1 is increased in temperature and might be thermally destructed.
Therefore, a motor driving device having a function of preventing such thermal destruction of the switching element might be used (See Japanese Patent Laid-Open Publication No. 2007-124849, for example). FIG. 10 is a diagram illustrating a configuration example of the motor driving device having the function of preventing thermal destruction of the switching element. A motor driving device 120 further includes a current detection unit 122 for detecting the presence or absence of an avalanche current in addition to the configuration of the motor driving device 100.
In the motor driving device 120, if the avalanche current is detected on the basis of a detection result of the current detection unit 122, the switching elements F1 to F4 are kept off, to suppress the occurrence of the avalanche state. Specifically, as shown in FIG. 11, if the switching element F1 repeats on/off while the coil L2 is connected to the motor driving device 120, for example, the current detecting voltage VR1 occurring at one end of the resistor R1 is changed so as to be increased to VREF1 during the period when the switching element F1 is on, and to rapidly become a negative voltage when the switching element F1 is turned off. On the other hand, if the coil L2 is disconnected from the motor driving device 120, even if the switching element F1 is turned off, the current detecting voltage VR1 is not rapidly decreased but slowly decreased. Thus, in the motor driving device 120, a reference voltage VREF2 lower than the reference voltage VREF1 is compared with the current detecting voltage VR1 in the current detection unit 122. The output control unit 102 determines, on the basis of the detection result of the current detection unit 122, that the avalanche current has occurred when the current detecting voltage VR1 is higher than the reference voltage VREF2 after a predetermined time has elapsed since the switching element F1 was turned off, and the output control unit 102 keeps the switching element off. When the switching elements F2 to F4 are on/off, the avalanche current is detected through a similar operation.
As mentioned above, in the motor driving device 120, whether or not the coils L1 to L4 are disconnected from the motor driving device 120 is detected using the avalanche current. However, since a change, in a current passed through the switching elements F1 to F4 after the switching elements F1 to F4 are turned off after being on, is different depending on a motor specification, even if the coils L1 to L4 are normally connected to the motor driving device 120, there might be such false detection that the coils L1 to L4 are disconnected from the motor driving device 120. For example, if a hybrid motor and a PM (Permanent Magnet) motor are compared, coupling between the coils L1 and L2 and the coils L3 and L4 might become poorer in the PM motor due to variations in product characteristics. Thus, in the case of the hybrid motor, the current ID passed through the switching element F1 is rapidly decreased if the switching element F1 is turned off after being on as shown in FIG. 12, while in the case of the PM motor, the current ID may keep being passed through the switching element F1 for a while even after the switching element F1 is turned off as shown in FIG. 13. Therefore, in such a PM motor, in the case where detection of the avalanche current is executed, before the switching element is turned off and the current is fully decreased, there might be false detection of coil disconnection.
Thus, in order to prevent the false detection of the coil disconnection in the PM motor in which a current is slowly decreased after the switching element is turned off, timing needs to be delayed of detection of the avalanche current after the switching element is turned off after being on. However, if the detection timing of the avalanche current is delayed, the avalanche state cannot be detected in the case of the hybrid motor with a relatively short time period of the avalanche state when the coil is disconnected.